/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */
<template>
    <sf-form ref="form" class="update_model_form" :label-width="100">
        <sf-form-item>
            <sf-fieldlabel>
                <lang>原任务名称</lang>
            </sf-fieldlabel>
              
        </sf-form-item>
        <sf-form-item>
            <sf-fieldlabel>
                <lang>项目名称</lang>
            </sf-fieldlabel>
            <sf-textfield
                v-model="submitData.name"
                :blurTrim="true"
                :default-width="defaultWidth"
                :max-length="30"
                :allow-blank="false"
                :utf8-length="false"
                vtype="name"
                ref="fieldName"
                :placeholder="_('请输入项目名称')"
            />
        </sf-form-item>
        <sf-form-item>
            <sf-fieldlabel>
                <lang>描述</lang>
            </sf-fieldlabel>
            <sf-textarea
                v-model="submitData.description"
                :default-width="defaultWidth"
                :max-length="300"
                :utf8-length="false"
                :placeholder="_('最多300字（选填）')"
            />
        </sf-form-item>
    </sf-form>
</template>
<script lang=ts>
    import { Component, Vue } from 'vue-property-decorator';

    const DEFAULT_WIDTH = 336;
    const DEFAULT_VALUE = {
        name: '',
        description: ''
    };

    @Component
    export default class UpdateModelForm extends Vue {
        get defaultWidth () {
            return DEFAULT_WIDTH;
        }
        submitData = { ...DEFAULT_VALUE }
        getJsonValue () {
            return this.submitData;
        }

        setJsonValue (data: typeof DEFAULT_VALUE) {
            this.submitData = Object.assign({ ...DEFAULT_VALUE }, data);
        }
    };
</script>
<style lang="less" scoped>
.label-form {

}
</style>
              